﻿<%@ Page Title="Korle Bu Reports" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true"
    CodeBehind="Reports.aspx.cs" Inherits="KorleBu.Reports" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register TagPrefix="asp" Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="sidebarcontentplaceholder" runat="server">
    <p>
        <br />
        <asp:Label ID="lblLoggedInUser" runat="server" Font-Bold="true" Visible="true"/>
    </p>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="maincontentplaceholder" runat="server">
   <asp:ScriptManager ID="ScriptManager" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel" runat="server">
        <ContentTemplate>
            <div id="ebar">
                <asp:Label runat="server" ID="lblMasterError" CssClass="errorLabel" />
            </div>
            <asp:TabContainer ID="TabContainer" runat="server" AutoPostBack="true" TabStripPlacement="Top"
                OnActiveTabChanged="TabContainer_ActiveTabChanged">
                <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TablPanel1" ScrollBars="Auto"
                    BackColor="Transparent" ForeColor="#6EA459">
                    <HeaderTemplate>
                        Monthly/Quarterly/Yearly Reports</HeaderTemplate>
                    <ContentTemplate>
                        <asp:Label ID="lblGenDRError" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                        <br />
                        <div id="divTabPanel1Header">
                            <div style="float: left;">
                                <fieldset>
                                    <legend>Monthly Report</legend>
                                    <asp:Label ID="lblSelectMonth" runat="server" Font-Size="12px" Font-Bold="true" Text="Select Month:" /><asp:DropDownList
                                        ID="ddlMonth" runat="server" OnSelectedIndexChanged="ddlMonth_OnSelectedIndexChanged"
                                        AutoPostBack="true">
                                        <asp:ListItem Value="0">Select Month...</asp:ListItem>
                                        <asp:ListItem Value="1">January</asp:ListItem>
                                        <asp:ListItem Value="2">February</asp:ListItem>
                                        <asp:ListItem Value="3">March</asp:ListItem>
                                        <asp:ListItem Value="4">April</asp:ListItem>
                                        <asp:ListItem Value="5">May</asp:ListItem>
                                        <asp:ListItem Value="6">June</asp:ListItem>
                                        <asp:ListItem Value="7">July</asp:ListItem>
                                        <asp:ListItem Value="8">August</asp:ListItem>
                                        <asp:ListItem Value="9">September</asp:ListItem>
                                        <asp:ListItem Value="10">October</asp:ListItem>
                                        <asp:ListItem Value="11">November</asp:ListItem>
                                        <asp:ListItem Value="12">December</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Label ID="lblSelectMRYear" runat="server" Font-Size="12px" Font-Bold="true" Text="Select Year:" /><asp:DropDownList
                                        ID="ddlMRYear" runat="server" OnSelectedIndexChanged="ddlMRYear_OnSelectedIndexChanged"
                                        AutoPostBack="true" Enabled="false">
                                        <asp:ListItem>Year</asp:ListItem>
                                    </asp:DropDownList>
                                    <br />
                                    <asp:Button ID="btnGenMonthReport" Style="margin: 10px 0 0 110px; height: 30px;"
                                        runat="server" Text="Generate Report" OnClick="btnGenMonthReport_OnClick" />
                                </fieldset>
                            </div>
                            <div style="float: left;">
                                <fieldset>
                                    <legend>Quarterly Report</legend>
                                    <asp:Label ID="lblSelectQuarter" runat="server" Font-Size="12px" Font-Bold="true" Text="Select Quarter:" /><asp:DropDownList
                                        ID="ddlQuarter" runat="server" OnSelectedIndexChanged="ddlQuarter_OnSelectedIndexChanged"
                                        AutoPostBack="true">
                                        <asp:ListItem Value="0">Select Quarter...</asp:ListItem>
                                        <asp:ListItem Value="1">1st Quarter</asp:ListItem>
                                        <asp:ListItem Value="2">2nd Quarter</asp:ListItem>
                                        <asp:ListItem Value="3">3rd Quarter</asp:ListItem>
                                        <asp:ListItem Value="4">4th Quarter</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Label ID="lblQRYear" runat="server" Font-Size="12px" Font-Bold="true" Text="Select Year:" /><asp:DropDownList
                                        ID="ddlQRYear" runat="server" OnSelectedIndexChanged="ddlQRYear_OnSelectedIndexChanged"
                                        AutoPostBack="true" Enabled="false">
                                        <asp:ListItem>Year</asp:ListItem>
                                    </asp:DropDownList>
                                    <br />
                                    <asp:Button ID="btnGenQuarterReport" Style="margin: 10px 0 0 119px; height: 30px;"
                                        runat="server" Text="Generate Report" OnClick="btnGenQuarterReport_OnClick" />
                                </fieldset>
                            </div>
                            <div style="float: left;">
                                <fieldset>
                                    <legend>Yearly Report</legend>
                                    <asp:Label ID="lblSelectYear" runat="server" Font-Size="12px" Font-Bold="true" Text="Select Year:" /><asp:DropDownList
                                        ID="ddlYear" runat="server" OnSelectedIndexChanged="ddlYear_OnSelectedIndexChanged"
                                        AutoPostBack="true">
                                        <asp:ListItem>Year</asp:ListItem>
                                    </asp:DropDownList>
                                    <br />
                                    <asp:Button ID="btnGenYearReport" Style="margin: 10px 0 0 16px; height: 30px;" runat="server"
                                        Text="Generate Report" OnClick="btnGenYearReport_OnClick" />
                                </fieldset>
                            </div>
                        </div>
                        <div id="divMonthInv" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvMonthInv" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" runat="server" PageCountMode="Actual" Font-Names="Verdana"
                                Font-Size="8pt" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana"
                                WaitMessageFont-Size="14pt" Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Monthly Report" ReportPath="Report_Files\MonthlyReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsMonthInv" Name="dsMI" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsMonthInv" runat="server" SelectMethod="GetData" TypeName="KorleBu.MonthlyTableAdapters.sp_report_itemReportForDateRangeTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                        <div id="divQuarterInv" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvQuarterInv" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" runat="server" PageCountMode="Actual" Font-Names="Verdana"
                                Font-Size="8pt" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana"
                                WaitMessageFont-Size="14pt" Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Quarterly Report" ReportPath="Report_Files\QuarterlyReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsQuarterInv" Name="dsQI" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsQuarterInv" runat="server" SelectMethod="GetData" TypeName="KorleBu.QuarterlyTableAdapters.sp_report_itemReportForDateRangeTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                        <div id="divYearInv" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvYearInv" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" runat="server" PageCountMode="Actual" Font-Names="Verdana"
                                Font-Size="8pt" InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana"
                                WaitMessageFont-Size="14pt" Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Yearly Report" ReportPath="Report_Files\YearlyReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsYearInv" Name="dsYI" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsYearInv" runat="server" SelectMethod="GetData" TypeName="KorleBu.YearlyTableAdapters.sp_report_itemReportForDateRangeTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2" ScrollBars="Auto"
                    BackColor="Transparent" ForeColor="#6EA459">
                    <HeaderTemplate>
                        Current Inventory Reports</HeaderTemplate>
                    <ContentTemplate>
                        <asp:Label ID="lblGenCRError" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                        <br />
                        <div id="divTabPanel2Header">
                            <div style="float: left;">
                                <fieldset>
                                    <legend>Current Inventory Report</legend>
                                    <asp:Label ID="lblSelectFilter" Font-Size="12px" Font-Bold="true" runat="server" Text="Filter By:" /><asp:DropDownList
                                        ID="ddlFilter" runat="server" OnSelectedIndexChanged="ddlFilter_OnSelectedIndexChanged"
                                        AutoPostBack="true">
                                        <asp:ListItem Value="0">Choose Filter...</asp:ListItem>
                                        <asp:ListItem Value="1">All Items</asp:ListItem>
                                        <asp:ListItem Value="2">Item</asp:ListItem>
                                        <%--<asp:ListItem Value="3">Sub Unit</asp:ListItem>--%>
                                        <asp:ListItem Value="4">Item Category</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:DropDownList ID="ddlAdvFilter" runat="server">
                                        <asp:ListItem Value="0">Advance Filter...</asp:ListItem>
                                    </asp:DropDownList>
                                    <br />
                                    <asp:Button ID="btnGenCurInvReport" Style="margin: 10px 0 0 95px; height: 30px;"
                                        runat="server" Text="Generate Report" OnClick="btnGenCurInvReport_OnClick" />
                                </fieldset>
                            </div>
                        </div>
                        <div id="divCurInvAll" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvCurInvAll" runat="server" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" PageCountMode="Actual" Font-Names="Verdana" Font-Size="8pt"
                                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Current Assets Report" ReportPath="Report_Files\CurrentItemsReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsCurInvAll" Name="dsCIA" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsCurInvAll" runat="server" SelectMethod="GetData" TypeName="KorleBu.CurrentItemsTableAdapters.sp_reports_currentItemsTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                        <div id="divCurInvItem" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvCurInvItem" runat="server" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" PageCountMode="Actual" Font-Names="Verdana" Font-Size="8pt"
                                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Current Asset Report" ReportPath="Report_Files\CurrentItemsByItemIDReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsCurInvItem" Name="dsCII" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsCurInvItem" runat="server" SelectMethod="GetData" TypeName="KorleBu.CurrentItemsByItemIDTableAdapters.sp_reports_currentItemByItemIDTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                        <div id="divCurInvSub" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvCurInvSub" runat="server" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" PageCountMode="Actual" Font-Names="Verdana" Font-Size="8pt"
                                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Current Assets By Sub Unit Report" ReportPath="Report_Files\CurrentItemsBySubUnitReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsCurInvSub" Name="dsCISU" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsCurInvSub" runat="server" SelectMethod="GetData" TypeName="KorleBu.CurrentItemsBySubUnitTableAdapters.sp_reports_currentItemsBySubUnitTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                        <div id="divCurInvCat" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvCurInvCat" runat="server" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" PageCountMode="Actual" Font-Names="Verdana" Font-Size="8pt"
                                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Current Assets By Category Report" ReportPath="Report_Files\CurrentItemsByCategoryReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsCurInvCat" Name="dsCIC" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsCurInvCat" runat="server" SelectMethod="GetData" TypeName="KorleBu.CurrentItemsByCategoryTableAdapters.sp_reports_currentItemsByCategoryTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel runat="server" HeaderText="TabPanel3" ID="TabPanel3" ScrollBars="Auto"
                    BackColor="Transparent" ForeColor="#6EA459">
                    <HeaderTemplate>
                        Item Adjustments Reports</HeaderTemplate>
                    <ContentTemplate>
                        <asp:Label ID="lblGenIARError" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                        <br />
                        <div id="divTabPanel3Header">
                            <div style="float: left;">
                                <fieldset>
                                    <legend>Item Adjustments Report</legend>
                                    <asp:Label ID="lblBeginningDate" Font-Size="12px" Font-Bold="true" runat="server" Text="Select Beginning Date:" />
                                    <asp:TextBox ID="txtStartDate" Style="margin-right: 10px;" runat="server" MaxLength="10" />
                                    <asp:CalendarExtender ID="ceStartDate" runat="server" TargetControlID="txtStartDate">
                                    </asp:CalendarExtender>
                                    <asp:Label ID="lblEndingDate" Font-Size="12px" Font-Bold="true" runat="server" Text="Select Ending Date:" />
                                    <asp:TextBox ID="txtEndDate" runat="server" MaxLength="10" />
                                    <asp:CalendarExtender ID="ceEndDate" runat="server" TargetControlID="txtEndDate">
                                    </asp:CalendarExtender>
                                    <br />
                                    <asp:Button ID="btnGenItemAdjustReport" Style="margin: 10px 0 0 258px; height: 30px;"
                                        runat="server" Text="Generate Report" OnClick="btnGenItemAdjustReport_OnClick" />
                                </fieldset>
                            </div>
                        </div>
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <br />
                        <div id="divItemAdjust" runat="server" style="display: none; float: left;">
                            <rsweb:ReportViewer ID="rvItemAdjust" runat="server" ShowRefreshButton="true" ShowExportControls="false"
                                ShowFindControls="true" ShowPageNavigationControls="true" ShowReportBody="true"
                                ShowPrintButton="true" PageCountMode="Actual" Font-Names="Verdana" Font-Size="8pt"
                                InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt"
                                Visible="false" Width="900px" Height="1676px">
                                <LocalReport DisplayName="Item Adjustments Report" ReportPath="Report_Files\ItemAdjustmentsReport.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="odsItemAdjust" Name="dsIA" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="odsItemAdjust" runat="server" SelectMethod="GetData" TypeName="KorleBu.ItemAdjustmentsTableAdapters.sp_reports_itemAdjustmentsByDateRangeTableAdapter">
                            </asp:ObjectDataSource>
                        </div>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
